IStateMachine

interface IStateMachine<S, T : Any>

State machine interface that requires the ability to transition finite states.

Functions

Link copied to clipboard
abstract fun transition(transition: T)

Transition the machine.

Link copied to clipboard
abstract fun transitionsTo(targetState: S): Set<KClass<out T>>

Get the transition required to move to a given state.

Properties

Link copied to clipboard
abstract val state: S

Current state of the machine.

Link copied to clipboard
abstract val transitions: Set<KClass<out T>>

Transitions available to the current state.

Inheritors

StateMachine
Link copied to clipboard